﻿

public class Request_Visit : RequestBase
{

    public const string Key = "Visit";

    public FromToUserRequestData visitReqData = new FromToUserRequestData();

    protected override ISerialize requestData
    {
        get
        {
            return visitReqData;
        }
    }

    public Request_Visit() : base()
    {
        MessagePacket.key = Key;
    }

    public override void OnSend()
    {
        base.OnSend();

        GameDebug.Log($"{visitReqData.fromUserId} 访问：{visitReqData.toUserId}");
    }

    public override ResponseData NewResponseData() => new VisitResponseData();


    //public override ResponseBase GetResponseHandler()
    //{
    //    return new Response_Visit();
    //}
}
//public class Response_Visit : ResponseBase
//{

//    public override ResponseData NewResponseData() => new VisitResponseData();

//    public override void Excuate()
//    {
//        //GameDebug.LogShowy("Request_Visit -> Excuate");

//        (this.request as Request_Visit).onResponse?.Invoke(this);
//    }
//}


//public class Request_Purchase : RequestBase
//{

//    public Request_Purchase() : base()
//    {
//        this.MessagePacket.key = "Purchase";
//    }


//    public PurchaseRequestData PurchaseRequestData;

//    protected override ISerialize requestData
//    {
//        get
//        {
//            return PurchaseRequestData;
//        }
//    }

//    public override ResponseBase GetResponseHandler()
//    {
//        return new Response_Buy();
//    }

//}
//public class Response_Buy : ResponseBase
//{
//    public override ResponseData NewResponseData()
//    {
//        return new ResponseData();
//    }

//    public override void Excuate()
//    {
//        Request_Purchase req = this.request as Request_Purchase;
//        if (req != null)
//        {
//            req.onResponse?.Invoke(this);
//        }
//    }
//}
